#ifndef _TEXT_
#define _TEXT_

#define VGA_MISC_READ 0x3cc
int init_video();
unsigned short getcursor(void);
void setcursor(unsigned short offset);
void setswcursor(unsigned short offset);
int clrscr();
int scroll_screen(void);
int putchar_text(int ch);
void update_cursor();
int setpalette(unsigned char color,unsigned char r,unsigned char g,unsigned char b);
void movecursor(char amt);
void settextcolor(unsigned char color);
void set_put_char(void *fn);

void text_alert();
void text_normal();
void putstring(char *s);

typedef struct {
	unsigned short (*getcursor)(void);
	void (*setcursor)(unsigned short offset);
	int (*clrscr)();
	int (*scroll_screen)(void);
	void (*settextcolor)(unsigned char color);
	int (*putchar)(int ch);
	int (*putc)(unsigned char ch,unsigned char color);
	int (*setpalette)(unsigned char color,unsigned char r,unsigned char g,unsigned char b);
	void (*text_normal)();
	void (*text_alert)();
	void (*init_opt)(char noopt);
	void (*addopt)(char noopt,char *opts);
	char (*getopt)();
}textdev;

#endif
